<?php

namespace App\Http\Controllers\Index;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;

use App\Models\Imgs;
use App\Models\DevelopHistory;

class Enter extends Controller
{
    public function index()
    {
        $introduction = $this->getSetting('introduction', 'introduction');
        $video_url = $this->getSetting('introduction', 'video_url');

        $honor = Imgs::select('title', 'img_url')->GetShowIndex('honor')->get();

        $developHistory = DevelopHistory::select('time', 'value')->IsShow()->take(10)->latest('number')->get();

        return $this->code(200, [
            'introduction' => [
                'introduction' => $introduction,
                'video_url' => $video_url,
            ],
            'honor' => $honor,
            'develop_history' => $developHistory,
        ], 'data');
    }
}
